﻿using Dapper_Core.Model;
using Dapper_Core.Table;
using System;
using System.Collections.Generic;
using System.Text;

namespace Dapper_Core.BLL.Interface
{
    public interface ISys_RoleBusiness
    {
        /// <summary>
        /// 检查系统角色是否存在
        /// </summary>
        /// <param name="roleCode">角色Code</param>
        /// <param name="roleId">角色主键</param>
        /// <returns></returns>
        bool IsExist(string roleCode, string roleId = "");

        /// <summary>
        /// 软删除系统角色
        /// </summary>
        /// <param name="ids">系统角色主键，多个主键以逗号隔开</param>
        /// <param name="deleter">删除人</param>
        /// <returns></returns>
        bool Delete(string ids, string deleter);

        /// <summary>
        /// 获取角色分页信息
        /// </summary>
        /// <param name="pageIndex">页面索引（从0开始）</param>
        /// <param name="rowsPerPage">每页数据行数</param>
        /// <param name="search">模糊查询条件</param>
        /// <param name="orderby">排序条件</param>
        /// <returns></returns>
        (List<Sys_Role> roles, int count) GetPageList(int pageIndex, int rowsPerPage, string search, string orderby);
    }
}